<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/html">
<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <title>AdminLTE 2 | Log in</title>
  <!-- Tell the browser to be responsive to screen width -->
  <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">

  <!-- Bootstrap 3.3.6 -->
  <link rel="stylesheet" href="${lte}/bootstrap/css/bootstrap.min.css">
  <!-- Theme style -->
  <link rel="stylesheet" href="${lte}/dist/css/AdminLTE.min.css">
  <!-- iCheck -->
  <link rel="stylesheet" href="${lte}/plugins/iCheck/square/blue.css">

  <style>
    #validate-code-addon {
      padding: 0 3px 0 3px;
    }
  </style>
  <script>
    var rootPath = "${root}";
    var pagePath = "${page}";
    var ltePath = "${lte}";
    var distPath = "${dist}";
  </script>
</head>
<body class="hold-transition login-page">
<div class="login-box">
  <div class="login-logo">
    <a href="#"><b>Admin</b>LTE</a>
  </div>
  <!-- /.login-logo -->
  <div class="login-box-body">
    <% if (has(error)) {%>
    <div>
      <div class="alert alert-danger alert-dismissible" role="alert" style="margin: 10px auto;">
        <button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">&times;</span></button>
        <strong>Warning!</strong> ${error}
      </div>
    </div>
    <%}%>
    <form id="loginForm" action="${root}/login/user_login" method="post">
      <div class="form-group has-feedback">
        <input type="code" name="code" value="admin" class="form-control" placeholder="用户名">
        <span class="glyphicon glyphicon-user form-control-feedback"></span>
      </div>
      <div class="form-group has-feedback">
        <input type="password" name="password" value="123" class="form-control" placeholder="密码">
        <span class="glyphicon glyphicon-lock form-control-feedback"></span>
      </div>
      <div class="form-group">
        <div class="input-group">
          <input type="text" name="validateCode" maxlength="4" value="9999" class="form-control" placeholder="验证码">
          <span id="validate-code-addon" class="input-group-addon">
            <img src="${root}/img/validate_code" onclick="login.refreshValidateCode(this)">
          </span>
        </div>
      </div>

      <div class="form-group">
        <div class="input-group">
          <div class="checkbox icheck">
            <label>
              <input type="checkbox"> 记住我
            </label>
          </div>
        </div>
      </div>

      <div class="form-group">
        <button type="submit" data-loading-text="登录中..." class="btn btn-primary btn-block btn-flat">登陆</button>
      </div>
    </form>
  </div>
  <!-- /.login-box-body -->
</div>
<!-- /.login-box -->

<!-- js -->
<script src="${lte}/plugins/jQuery/jQuery-2.2.0.min.js" ></script>
<script src="${lte}/plugins/jQueryUI/jquery-ui.min.js" ></script>
<script src="${lte}/bootstrap/js/bootstrap.min.js" ></script>
<script src="${lte}/plugins/iCheck/icheck.min.js" ></script>
<script src="${lte}/plugins/sparkline/jquery.sparkline.min.js" ></script>
<script src="${lte}/plugins/knob/jquery.knob.js" ></script>
<script src="${lte}/plugins/daterangepicker/daterangepicker.js" ></script>
<script src="${lte}/plugins/datepicker/bootstrap-datepicker.js" ></script>
<script src="${lte}/plugins/slimScroll/jquery.slimscroll.min.js" ></script>
<script src="${lte}/plugins/fastclick/fastclick.js" ></script>
<script src="${lte}/dist/js/app.min.js" ></script>

<script src="${dist}/jquery-validation/dist/jquery.validate.js" ></script>
<script src="${dist}/moment/min/moment.min.js" ></script>

<script src="${page}/tools/validator.js" ></script>
<script src="${page}/login/login.js" ></script>

<script>
  $(function(){
    login.init();
  });
</script>
</body>
</html>
